package com.starry.module.system.api.logger.factory;

import com.starry.core.common.domain.R;
import com.starry.module.system.api.logger.SysLogErrorApi;
import com.starry.module.system.api.logger.domain.qo.SysLogErrorQo;
import org.springframework.cloud.openfeign.FallbackFactory;

/**
 * RPC-异常日志访问熔断处理
 *
 * @author xiaoke
 */
public class SysLogErrorApiFactory implements FallbackFactory<SysLogErrorApi> {
    @Override
    public SysLogErrorApi create(Throwable cause) {
        return new SysLogErrorApi() {

            @Override
            public R<Long> save(SysLogErrorQo qo) {
                return R.fail();
            }
        };
    }
}
